package com.jckj.core.entity;

import java.io.Serializable;

public class ArticalAttachmentKey implements Serializable {
    private String articalId;

    private String attachementId;

    private static final long serialVersionUID = 1L;

    public String getArticalId() {
        return articalId;
    }

    public void setArticalId(String articalId) {
        this.articalId = articalId == null ? null : articalId.trim();
    }

    public String getAttachementId() {
        return attachementId;
    }

    public void setAttachementId(String attachementId) {
        this.attachementId = attachementId == null ? null : attachementId.trim();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ArticalAttachmentKey other = (ArticalAttachmentKey) that;
        return (this.getArticalId() == null ? other.getArticalId() == null : this.getArticalId().equals(other.getArticalId()))
            && (this.getAttachementId() == null ? other.getAttachementId() == null : this.getAttachementId().equals(other.getAttachementId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getArticalId() == null) ? 0 : getArticalId().hashCode());
        result = prime * result + ((getAttachementId() == null) ? 0 : getAttachementId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", articalId=").append(articalId);
        sb.append(", attachementId=").append(attachementId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}